home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1991 …esperately Seeking Seven / Desperately Seeking Seven.2mg / Dev.CD.8 / Essentials / Tools / DTS.Samples / SC04Cust.Ctrl / BoxCtrl.asm < prev    next >
Encoding:
Assembly Source File  |  1990-05-25  |  26.0 KB  |  714 lines  |  [04] ASCII Text (0x0000)

  1. *******************************************************************************
  2. *
  3. * Custom Control -- Version 3.0
  4. *
  5. * (C)  Copyright Apple Computer, Inc. 1988-1990
  6. * All rights reserved.
  7. *
  8. * Developer Technical Support Apple II Sample Code
  9. *
  10. * by Keith Rollin
  11. *
  12. * The Custom control is a rectangle with little knobs on the corners and
  13. * sides. The knobs can be dragged to change the size of the rectangle.
  14. * Clicking on the frame will allow you to move the whole thing.
  15. *
  16. * The application sample shows how to create and use the control. It is used
  17. * to size and position a Simple Button control.
  18. *
  19. *******************************************************************************
  20. **********************************************************************
  21. *                                                                    *
  22. *             Apple IIGS Source Code Sampler, Volume I               *
  23. *                                                                    *
  24. *             Copyright (c) Apple Computer, Inc. 1988-1990           *
  25. *                       All Rights Reserved                          *
  26. *                                                                    *
  27. *            Written by Apple II Developer Tech Support              *
  28. *                                                                    *
  29. *                                                                    *
  30. *                                                                    *
  31. *  ----------------------------------------------------------------  *
  32. *                                                                    *
  33. *     This program and its derivatives are licensed only for         *
  34. *     use on Apple computers.                                        *
  35. *                                                                    *
  36. *     Works based on this program must contain and                   *
  37. *     conspicuously display this notice.                             *
  38. *                                                                    *
  39. *     This software is provided for your evaluation and to           *
  40. *     assist you in developing software for the Apple IIGS           *
  41. *     computer.                                                      *
  42. *                                                                    *
  43. *     DISCLAIMER OF WARRANTY                                         *
  44. *                                                                    *
  45. *     THE SOFTWARE IS PROVIDED "AS IS" WITHOUT                       *
  46. *     WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,               *
  47. *     WITH RESPECT TO ITS MERCHANTABILITY OR ITS FITNESS             *
  48. *     FOR ANY PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO             *
  49. *     THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH            *
  50. *     YOU.  SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU (AND            *
  51. *     NOT APPLE OR AN APPLE AUTHORIZED REPRESENTATIVE)               *
  52. *     ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING,             *
  53. *     REPAIR OR CORRECTION.                                          *
  54. *                                                                    *
  55. *     Apple does not warrant that the functions                      *
  56. *     contained in the Software will meet your requirements          *
  57. *     or that the operation of the Software will be                  *
  58. *     uninterrupted or error free or that defects in the             *
  59. *     Software will be corrected.                                    *
  60. *                                                                    *
  61. *     SOME STATES DO NOT ALLOW THE EXCLUSION                         *
  62. *     OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY              *
  63. *     NOT APPLY TO YOU.  THIS WARRANTY GIVES YOU SPECIFIC            *
  64. *     LEGAL RIGHTS AND YOU MAY ALSO HAVE OTHER RIGHTS                *
  65. *     WHICH VARY FROM STATE TO STATE.                                *
  66. *                                                                    *
  67. *                                                                    *
  68. **********************************************************************
  69.                     eject
  70.  
  71.                     case   on
  72.  
  73.  
  74.                     copy 2/ainclude/E16.Quickdraw
  75.                     copy 2/ainclude/E16.Memory
  76.                     copy 2/ainclude/E16.EVENT
  77.                     copy 2/ainclude/E16.Control
  78.                     copy 2/ainclude/E16.Window
  79.                     copy 2/ainclude/E16.Dialog
  80.                     mcopy macros/boxctrl.macros
  81.  
  82. *******************************************************************************
  83. *
  84. *    Equates used in this program.
  85. *
  86. *******************************************************************************
  87. DPHandle            gequ 0               ; Handle to Tool Direct Page area
  88. DPPointer           gequ DPHandle+4      ; Pointer to Tool Direct Page area
  89. deref               gequ DPPointer+4     ; Temporary Handle dereference area
  90. Ctl1Ptr             gequ deref+4
  91. Ctl2Ptr             gequ Ctl1Ptr+4
  92. Control1            gequ Ctl2Ptr+4
  93. Control2            gequ Control1+4
  94.  
  95. ScreenMode          gequ mode640         ; used for _QDStartup
  96. ScreenWidth         gequ 640             ; used for _EMStartup
  97.  
  98.  
  99.                     EJECT
  100. *******************************************************************************
  101. *
  102. Main                start
  103. *
  104. * Description:      This is the main routine. It calls routines to Initialize
  105. *                   the tools, initialize application specific data, run the
  106. *                   main EventLoop, close the application, and close the tools.
  107. *                   Then it calls the ProDOS Quit command.
  108. *
  109. *
  110. * Inputs:           NONE
  111. *
  112. * Outputs:          NONE
  113. *
  114. * External Refs:
  115. *                   Import InitTools
  116. *                   Import InitApp
  117. *                   Import EventLoop
  118. *                   Import CloseApp
  119. *                   Import CloseTools
  120. *                   Import QuitParms
  121. *
  122. * Entry Points:     NONE
  123. *
  124. *******************************************************************************
  125.  
  126.                     jsr InitTools
  127.                     jsr InitApp
  128.  
  129.                     _ShowCursor
  130.  
  131.                     jsr EventLoop
  132.  
  133.                     jsr CloseApp
  134.                     jsr CloseTools
  135.  
  136.                     _Quit QuitParms
  137.  
  138.                     end
  139.  
  140.                     EJECT
  141. *******************************************************************************
  142. *
  143. Globals             data
  144. *
  145. * Description:      Holder of all of our data.
  146. *
  147. *
  148. * Inputs:           N/A
  149. *
  150. * Outputs:          N/A
  151. *
  152. * External Refs:    
  153. *                   Import doUpdate     ; to update windows
  154. *
  155. * Entry Points:
  156. *                   Export QuitParms    ; used by Main
  157. *
  158. *******************************************************************************
  159. *
  160. * Standard global data
  161. *
  162. *******************************************************************************
  163.  
  164. TitleString         str 'Custom Control Example Program'
  165. AutString           str 'By Keith Rollin Apple DTS -- Version: 3.0'
  166. VersString          str 'Copyright (c) 1988-1990 Apple Computer'
  167.  
  168. MenuHeight          ds 2                ; Stored height of menu bar
  169. MyID                ds 2                ; Application ID
  170. MyDP                ds 2                ; My direct page storage
  171.  
  172. QuitFlag            ds 2
  173. QuitParms           dc i4'0'            ; Pathname of next app
  174.                     dc i2'$00'          ; flags
  175.  
  176. EventRecord         ANOP
  177. EventWhat           ds 2
  178. EventMessage        ds 4
  179. EventWhen           ds 4
  180. EventWhere          ds 4
  181. EventModifiers      ds 2
  182. TaskData            ds 4
  183. TaskMask            dc i4'$0000FFFF'
  184.  
  185.                     EJECT
  186. *******************************************************************************
  187. *
  188. * Application specific global data
  189. *
  190. *******************************************************************************
  191.  
  192. ; This is a list of pointers to the text that is used to create our menus. It
  193. ; is used by InitApp to find all of the menu templates and use them to create
  194. ; our menubar. This loop loads MenuPtrLen-4 into an index, gets the
  195. ; corresponding menu template pointer in this table, and uses that in a
  196. ; NewMenu call. It then decrements the index by 4, and repeats the procees
  197. ; until the index is negative.
  198.  
  199. MenuPtr             dc i4'AppMenu'
  200.                     dc i4'FileMenu'
  201.                     dc i4'EditMenu'
  202. MenuPtrLen          equ *-MenuPtr
  203.  
  204.  
  205. ; Menu list: menu items should be numbered consecutivly starting from 250.
  206. ; As a convention, use 256 as about and 257 as Quit.
  207.  
  208. AppMenu             dc c'$$@\XN1',h'00'
  209.                     dc c'--About Custom Control...\N256V',h'00'
  210.                     dc c'.'
  211. FileMenu            dc c'$$  File  \N2',h'00'
  212.                     dc c'--Hide Sizer\N259',h'00'
  213.                     dc c'--Show Sizer\N258D',h'00'
  214.                     dc c'--Close\N255DV',h'00'
  215.                     dc c'--Quit\N257*Qq',h'00'
  216.                     dc c'.'
  217. EditMenu            dc c'$$  Edit  \N3',h'00'
  218.                     dc c'--Undo\N250*ZzVD',h'00'
  219.                     dc c'--Cut\N251*XxD',h'00'
  220.                     dc c'--Copy\N252*CcD',h'00'
  221.                     dc c'--Paste\N253*VvD',h'00'
  222.                     dc c'--Clear\N254D',h'00'
  223.                     dc c'.'
  224.  
  225. theWindow           ds 4
  226.  
  227.  
  228. WindowTitle         str '  Custom Control  '
  229.  
  230. Stripes             dc i2'$0000'        ; Black frame
  231.                     dc i2'$0f00'        ; Inact TBcolor, Inact TColor, Tcolor
  232.                     dc i2'$020f'        ; Pattern, Pattern color, BG color
  233.                     dc i2'$0000'        ; Frame growbox unselcted/selected
  234.                     dc i2'$00f0'        ; infobar color (white)
  235.  
  236. WindData            dc i2'WEnd-WindData'
  237.                     dc i2'fTitle+fMove+fVis+fCtlTie'
  238.                     dc i4'WindowTitle'  ; Ptr to title
  239.                     dc i4'$0'           ; RefCon
  240.                     dc i2'0,0,0,0'      ; Full Size (0= default)
  241.                     dc i4'Stripes'      ; Color Table Pointer
  242.                     dc i2'0,0'          ; Vertical/Horizontal origin
  243.                     dc i2'0,0'          ; Data area height, width
  244.                     dc i2'0,0'          ; Max Cont height, width
  245.                     dc i2'0,0'          ; Pixels to scroll vert'ly, horiz'ly
  246.                     dc i2'0,0'          ; Pixels to page vert'ly, horiz'ly
  247.                     dc i4'0'            ; Information bar refcon.
  248.                     dc i2'0'            ; Info bar height
  249.                     dc i4'0'            ; DefProc.
  250.                     dc i4'0'            ; Routine to draw info. bar.
  251.                     dc i4'doUpdate'     ; Routine to draw content.
  252.                     dc i2'30,40,160,400'                    ; Size and position
  253.                     dc i4'$FFFFFFFF'    ; Plane to put window up in (topmost).
  254.                     dc i4'0'            ; Address of window record (0 to alloc)
  255. WEnd                ANOP
  256.                     end
  257.  
  258.                     EJECT
  259. *******************************************************************************
  260. *
  261. InitApp             start
  262. *
  263. * Description:      Perform any application specific initialization.
  264. *
  265. * Inputs:           NONE
  266. *
  267. * Outputs:          NONE
  268. *
  269. * External Refs:
  270. *                   Import BoxProc
  271. *
  272. * Entry Points:     NONE
  273. *
  274. *******************************************************************************
  275.                     using Globals
  276.  
  277.                     stz QuitFlag
  278.  
  279.                     pha
  280.                     pha
  281.                     PushLong #WindData
  282.                     _NewWindow
  283.                     PullLong theWindow  ; Pull off the window pointer
  284.  
  285. ; Create the two controls that we will be using in this demo. They are a
  286. ; custom control, and a simply button that will be resized and moved with
  287. ; the custom control. However, it is important that they be created in the
  288. ; right order. Since they will be lying right on top of each other, it is not
  289. ; apparent which one we want to select when we click on one of them. In cases
  290. ; like this, where a mouse click is on top of two controls, the Control
  291. ; Manager selects the one that was created first. So we create the custom
  292. ; control first.
  293.  
  294.                     pha                 ; space for result
  295.                     pha
  296.                     PushLong theWindow
  297.                     PushLong #theRect
  298.                     PushLong #0         ; no title
  299.                     PushWord #%111      ; vis, int will drag, corners & edges
  300.                     PushWord #$0503     ; Width = 5/Height = 3
  301.                     PushLong #CtrlData  ; Pointer to additional data
  302.                     PushLong #BoxProc   ; DefProc
  303.                     PushLong #0         ; refcon
  304.                     PushLong #0         ; std color table
  305.                     _NewControl
  306.                     PullLong Control1
  307.  
  308. ; It is possible that the rectangle that was used to create the above
  309. ; control is no longer the rectangle that is being used. This is because
  310. ; of the feature that aligns the corners of the control to the grid.
  311. ; In order to make the next control fall inside of the above control, get
  312. ; the CtlRect from its record, and use that when creating the simple
  313. ; button below.
  314.  
  315.                     ldy #2              ; dereference the Control handle
  316.                     lda [Control1],y    ; to get a pointer to the control
  317.                     sta Ctl1Ptr+2       ; record into 'Ctl1Ptr'
  318.                     lda [Control1]
  319.                     sta Ctl1Ptr
  320.  
  321.                     ldy #octlRect+6     ; now copy the control's rectangle
  322.                     ldx #6              ; into 'theRect'
  323. loop0010            lda [Ctl1Ptr],y
  324.                     sta theRect,x
  325.                     dey
  326.                     dey
  327.                     dex
  328.                     dex
  329.                     bpl loop0010
  330.  
  331. ; now that that is done, we can create the simple button control
  332.  
  333.                     pha                 ; space for result
  334.                     pha
  335.                     PushLong theWindow
  336.                     PushLong #theRect
  337.                     PushLong #Title
  338.                     PushWord #0
  339.                     PushWord #0
  340.                     PushLong #0
  341.                     PushLong #simpleProc
  342.                     PushLong #0         ; refcon
  343.                     PushLong #0         ; std color table
  344.                     _NewControl
  345.                     PullLong Control2
  346.  
  347.                     rts
  348.  
  349. theRect             dc i2'50,140,110,300'
  350. Title               str 'Move/Resize Me'
  351. CtrlData            dc i2'10'           ; min Y
  352.                     dc i2'10'           ; min X
  353.                     dc i2'100'          ; max Y
  354.                     dc i2'200'          ; max X
  355.                     dc i2'16'           ; grid Y
  356.                     dc i2'32'           ; grid X
  357.                     end
  358.  
  359.                     EJECT
  360. *******************************************************************************
  361. *
  362. CloseApp            start
  363. *
  364. * Description:      Close down things. This disposes of all items and memory
  365. *                   that we allocated.
  366. *
  367. *
  368. * Inputs:           NONE
  369. *
  370. * Outputs:          NONE
  371. *
  372. * External Refs:    NONE
  373. *
  374. * Entry Points:     NONE
  375. *
  376. *******************************************************************************
  377.                     using Globals
  378.  
  379.                     rts
  380.                     end
  381.  
  382.                     EJECT
  383. *******************************************************************************
  384. *
  385. EventLoop           start
  386. *
  387. * Description:      Main Event Loop. Handle things until user selects Quit.
  388. *
  389. *
  390. * Inputs:           NONE
  391. *
  392. * Outputs:          NONE
  393. *
  394. * External Refs:
  395. *                   Import MenuSelect
  396. *                   Import Ignore
  397. *                   Import doUpdate
  398. *                   Import InContent
  399. *
  400. * Entry Points:     NONE
  401. *
  402. *******************************************************************************
  403.                     using Globals
  404.  
  405. maxEvent            equ wInactMenu
  406.  
  407.                     pha                 ; Push on space for TaskMaster result
  408.                     PushWord #everyEvent ; GetNextEvent mask
  409.                     PushLong #EventRecord ; Pointer to Event Record
  410.                     _TaskMaster
  411.  
  412.                     pla                 ; Get TaskMaster result
  413.                     beq EventLoop       ; Remove if you want to use null events
  414.                     cmp #maxEvent+1     ; is the event number in range?
  415.                     bge EventLoop
  416.                     asl A               ; Turn it into an index
  417.                     tax
  418.                     jsr (TaskTable,x)   ; Call appropriate event handler
  419.  
  420.                     lda QuitFlag        ; Quit selected?
  421.                     beq EventLoop       ; no - keep looping
  422.  
  423.                     rts                 ; yes- leave the program
  424.  
  425. TaskTable           dc i2'Ignore'       ; 0 Null
  426.                     dc i2'Ignore'       ; 1 MouseDown
  427.                     dc i2'Ignore'       ; 2 MouseUp
  428.                     dc i2'Ignore'       ; 3 KeyDown
  429.                     dc i2'Ignore'       ; 4 undefined
  430.                     dc i2'Ignore'       ; 5 AutoKey
  431.                     dc i2'Ignore'       ; 6 Update
  432.                     dc i2'Ignore'       ; 7 undefined
  433.                     dc i2'Ignore'       ; 8 Activate
  434.                     dc i2'Ignore'       ; 9 Switch
  435.                     dc i2'Ignore'       ; 10 Desk accessory
  436.                     dc i2'Ignore'       ; 11 Device driver
  437.                     dc i2'Ignore'       ; 12 ap
  438.                     dc i2'Ignore'       ; 13 ap
  439.                     dc i2'Ignore'       ; 14 ap
  440.                     dc i2'Ignore'       ; 15 ap
  441.                     dc i2'Ignore'       ; TASK 0 indesk
  442.                     dc i2'MenuSelect'   ; TASK 1 in menuBar
  443.                     dc i2'Ignore'       ; TASK 2 in system window
  444.                     dc i2'InContent'    ; TASK 3 in content
  445.                     dc i2'Ignore'       ; TASK 4 in Drag
  446.                     dc i2'Ignore'       ; TASK 5 in grow
  447.                     dc i2'Ignore'       ; TASK 6 in goaway
  448.                     dc i2'Ignore'       ; TASK 7 in zoom
  449.                     dc i2'Ignore'       ; TASK 8 in info bar
  450.                     dc i2'MenuSelect'   ; TASK 9 in special menu
  451.                     dc i2'Ignore'       ; TASK 10 in NDA
  452.                     dc i2'Ignore'       ; TASK 11 in frame
  453.                     dc i2'Ignore'       ; TASK 12 in drop
  454.  
  455.                     end
  456.  
  457.                     EJECT
  458. *******************************************************************************
  459. *
  460. MenuSelect          start
  461. *
  462. * Description:      This routine is called when TaskMaster returns a menu
  463. *                   event. It takes the menu item that was hit and calculates
  464. *                   an offset into the menu dispatch table. It then calls that
  465. *                   routine and unhilites the menu when it is done.
  466. *
  467. * Inputs:           TaskData holds menu item selected.
  468. *
  469. * Outputs:          NONE
  470. *
  471. * External Refs:
  472. *                   Import Ignore
  473. *                   Import doAbout
  474. *                   Import doQuit
  475. *                   Import ShowSizer
  476. *                   Import HideSizer
  477. *
  478. * Entry Points:     NONE
  479. *
  480. *******************************************************************************
  481.                     using Globals
  482.  
  483.                     lda TaskData        ; Get the ID of the menu item selected.
  484.                     sec                 ; Turn it into an index by subtracting
  485.                     sbc #250            ; the starting ID number (25) and mul-
  486.                     asl a               ; tiplying by 2 (each table entry con-
  487.                     tax                 ; sists of 2 bytes).
  488.                     jsr (MenuTable,x)   ; Call the routine behind it.
  489.  
  490.                     PushWord #0         ; Routine done - unhilite the menubar.
  491.                     PushWord TaskData+2
  492.                     _HiLiteMenu
  493.  
  494.                     rts
  495.  
  496. MenuTable           dc i2'Ignore'       ; undo
  497.                     dc i2'Ignore'       ; cut
  498.                     dc i2'Ignore'       ; copy
  499.                     dc i2'Ignore'       ; paste
  500.                     dc i2'Ignore'       ; clear
  501.                     dc i2'Ignore'       ; close
  502.                     dc i2'doAbout'
  503.                     dc i2'doQuit'
  504.                     dc i2'ShowSizer'
  505.                     dc i2'HideSizer'
  506.                     end
  507.  
  508.                     EJECT
  509. *******************************************************************************
  510. *
  511. Ignore              start
  512. *
  513. * Description:      Called when I want to ignore an event.
  514. *
  515. *
  516. * Inputs:           NONE
  517. *
  518. * Outputs:          NONE
  519. *
  520. * External Refs:    NONE
  521. *
  522. * Entry Points:     NONE
  523. *
  524. *******************************************************************************
  525.  
  526.                     rts
  527.                     end
  528.  
  529.                     EJECT
  530. *******************************************************************************
  531. *
  532. doUpdate            start
  533. *
  534. * Description:      Called by TaskMaster to update a window's contents.
  535. *
  536. *
  537. * Inputs:           NONE
  538. *
  539. * Outputs:          NONE
  540. *
  541. * External Refs:    NONE
  542. *
  543. * Entry Points:     NONE
  544. *
  545. *******************************************************************************
  546.                     using Globals
  547.                     
  548.                     pha
  549.                     pha
  550.                     _GetPort
  551.                     _DrawControls
  552.  
  553.                     rtl
  554.                     end
  555.  
  556.                     EJECT
  557. *******************************************************************************
  558. *
  559. InContent           start
  560. *
  561. * Description:      Handle clicks within the content region of a window. In
  562. *                   this demo, we want to see if we have clicked on either of
  563. *                   the controls. We do this by calling FindControl. If
  564. *                   FindControl tells us that we clicked on a control, then we
  565. *                   want to track the actions of that control as we move the
  566. *                   mouse. Calling TrackControl will do this until the use
  567. *                   lift up on the mouse button. Finally, if the control we
  568. *                   were tracking was the 'sizer' custom control, we want to
  569. *                   resize/move the simple button that was associated with it.
  570. *                   So we hide the button, change its bounding rectangle, and
  571. *                   show it again in its new location.
  572. *
  573. *
  574. * Inputs:           NONE
  575. *
  576. * Outputs:          NONE
  577. *
  578. * External Refs:    NONE
  579. *
  580. * Entry Points:     NONE
  581. *
  582. *******************************************************************************
  583.                     using Globals
  584.                     
  585.                     pha
  586.                     PushLong #theControl
  587.                     PushLong EventWhere
  588.                     PushLong theWindow
  589.                     _FindControl
  590.                     pla                 ; pull off the part code
  591.                     bne TrackIt         ; hit a control
  592.                     brl done
  593.  
  594. TrackIt             pha
  595.                     PushLong EventWhere
  596.                     PushLong #0         ; no action Proc
  597.                     PushLong theControl
  598.                     _TrackControl
  599.                     pla
  600.  
  601.                     cmp #$A0            ; did we track the Sizer?
  602.                     bne done            ; no, so don't move anything
  603.  
  604.                     PushLong Control2   ; hide the simple button
  605.                     _HideControl
  606.  
  607.                     PushLong Control1   ; hide the Sizer
  608.                     _HideControl
  609.  
  610.                     ldy #2              ; Get Control's pointer and put it
  611.                     lda [Control1],y    ; into a Direct Page location
  612.                     sta Ctl1Ptr+2
  613.                     lda [Control1]
  614.                     sta Ctl1Ptr         ; 'Ctl1Ptr' points to the Sizer.
  615.  
  616.                     ldy #2              ; Do the exact same thing with the
  617.                     lda [Control2],y    ; simple button.
  618.                     sta Ctl2Ptr+2       
  619.                     lda [Control2]
  620.                     sta Ctl2Ptr         ; 'Ctl2Ptr' points to the simple button
  621.  
  622.                     ldy #octlRect       ; Now copy the bounding rectangle of
  623. loop                lda [Ctl1Ptr],y     ; the Sizer into the bounding rectangle
  624.                     sta [Ctl2Ptr],y     ; of the button. When we next show the
  625.                     iny                 ; button, it will have the same size
  626.                     iny                 ; and location as the Sizer.
  627.                     cpy #octlRect+8
  628.                     bne loop
  629.  
  630.                     PushLong Control2   ; Now Show Them both
  631.                     _ShowControl
  632.  
  633.                     PushLong Control1
  634.                     _ShowControl
  635.  
  636. done                ANOP
  637.                     rts
  638.  
  639. theControl          ds 4
  640.  
  641.                     end
  642.  
  643.                     EJECT
  644. *******************************************************************************
  645. *
  646. ShowSizer           start
  647. *
  648. * Description:      Call _ShowControl to...well...uh, show the control. Disable
  649. *                   the "Show Sizer" menu item and enable the "Hide Sizer" menu
  650. *                   item.
  651. *
  652. *
  653. * Inputs:           NONE
  654. *
  655. * Outputs:          NONE
  656. *
  657. * External Refs:    NONE
  658. *
  659. * Entry Points:     NONE
  660. *
  661. *******************************************************************************
  662.                     using Globals
  663.  
  664.                     PushLong Control1
  665.                     _ShowControl
  666.  
  667.                     PushWord #258       ; Disable the Show menu item
  668.                     _DisableMItem
  669.  
  670.                     PushWord #259       ; Enable the Hide Menu item
  671.                     _EnableMItem
  672.  
  673.                     rts
  674.                     end
  675.  
  676.  
  677.                     EJECT
  678. *******************************************************************************
  679. *
  680. HideSizer           start
  681. *
  682. * Description:      Call _HideControl to hide the control. Enable the "Show
  683. *                   Sizer" menu item and disable the "Hide Sizer" menu item.
  684. *
  685. *
  686. * Inputs:           NONE
  687. *
  688. * Outputs:          NONE
  689. *
  690. * External Refs:    NONE
  691. *
  692. * Entry Points:     NONE
  693. *
  694. *******************************************************************************
  695.                     using Globals
  696.  
  697.                     PushLong Control1
  698.                     _HideControl
  699.  
  700.                     PushWord #258       ; Enable the Show menu item
  701.                     _EnableMItem
  702.  
  703.                     PushWord #259       ; Disable the Hide Menu item
  704.                     _DisableMItem
  705.  
  706.                     rts
  707.                     end
  708.  
  709.                     copy bc.stds.asm
  710.                     copy bc.dproc.asm1
  711.                     copy bc.dproc.asm2
  712.  
  713.                     END
  714.